Technical Field
As is known, digital cameras record, store, and transmit images in several industry standard formats, such as H.234 and JPEG. The field of the invention is in the field of image analysis, particularly image compression or coding applied to products of Huffman and DCT encoding.
JPEG
As is known, the name “JPEG” stands for Joint Photographic Experts Group, the name of the committee that created the JPEG standard and also other still picture coding standards.
The JPEG standard specifies the codec (code decode transform), which defines how an image is compressed into a stream of bytes and decompressed back into an image, but not the file format used to contain that stream.
JPEG uses a lossy form of compression based on the discrete cosine transform (DCT). This mathematical operation converts each frame/field of the video source from the spatial (2D) domain into the frequency domain (aka transform domain.) A perceptual model based loosely on the human psychovisual system discards high-frequency information, i.e. sharp transitions in intensity, and color hue. In the transform domain, the process of reducing information is called quantization. In simpler terms, quantization is a method for optimally reducing a large number scale (with different occurrences of each number) into a smaller one, and the transform-domain is a convenient representation of the image because the high-frequency coefficients, which contribute less to the over picture than other coefficients, are characteristically small-values with high compressibility. The quantized coefficients are then sequenced and losslessly packed into the output bitstream. Nearly all software implementations of JPEG permit user control over the compression-ratio (as well as other optional parameters), allowing the user to trade off picture-quality for smaller file size.
JPEG File Interchange Format (JFIF) is a minimal file format which enables JPEG bitstreams to be exchanged between a wide variety of platforms and applications. This minimal format does not include any of the advanced features found in the TIFF JPEG specification or any application specific file format. Nor should it, for the only purpose of this simplified format is to allow the exchange of JPEG compressed images.
JPEG Codec Example
Although a JPEG file can be encoded in various ways, most commonly it is done with JFIF encoding. The encoding process consists of several steps:
1. The representation of the colors in the image is converted from RGB to Y′CBCR, consisting of one luma component (Y′), representing brightness, and two chroma components, (CB and CR), representing color. This step is sometimes skipped.
2. The resolution of the chroma data is reduced, usually by a factor of 2. This reflects the fact that the eye is less sensitive to fine color details than to fine brightness details.
3. The image is split into blocks of 8×8 pixels, and for each block, each of the Y, CB, and CR data undergoes the Discrete Cosine Transform (DCT. A DCT is similar to a Fourier transform in the sense that it produces a kind of spatial frequency spectrum.
4. The amplitudes of the frequency components are quantized. Human vision is much more sensitive to small variations in color or brightness over large areas than to the strength of high-frequency brightness variations. Therefore, the magnitudes of the high-frequency components are stored with a lower accuracy than the low-frequency components.5. The resulting data for all 8×8 blocks is further compressed with a lossless algorithm, a variant of Huffman encoding.6. The decoding process reverses these steps, except the quantization because it is irreversible.DCT
As is known, the discrete cosine transform (DCT) expresses a finite sequence of data points in terms of a sum of cosine functions oscillating at different frequencies. DCTs are important to numerous applications in science and engineering, from lossy compression of audio (e.g. MP3) and images (e.g. JPEG) (where small high-frequency components can be discarded), to spectral methods for the numerical solution of partial differential equations. The use of cosine rather than sine functions is critical in these applications: for compression, it turns out that cosine functions are much more efficient (fewer functions are needed to approximate a typical signal), whereas for differential equations the cosines express a particular choice of boundary conditions.
In particular, a DCT is a Fourier-related transform similar to the discrete Fourier transform (DFT), but using only real numbers. DCTs are equivalent to DFTs of roughly twice the length, operating on real data with even symmetry (since the Fourier transform of a real and even function is real and even), where in some variants the input and/or output data are shifted by half a sample. There are eight standard DCT variants, of which four are common.
The most common variant of discrete cosine transform is the type-II DCT, which is often called simply “the DCT”, its inverse, the type-III DCT, is correspondingly often called simply “the inverse DCT” or “the IDCT”.
The compression method is usually lossy, meaning that some original image information is lost and cannot be restored, possibly affecting image quality.
Like any Fourier-related transform, discrete cosine transforms (DCTs) express a function or a signal in terms of a sum of sinusoids with different frequencies and amplitudes. Like the discrete Fourier transform (DFT), a DCT operates on a function at a finite number of discrete data points. The obvious distinction between a DCT and a DFT is that the former uses only cosine functions, while the latter uses both cosines and sines (in the form of complex exponentials).
Huffman Encoding/Decoding
As is known, Huffman coding is an entropy encoding algorithm used for lossless data compression. The term refers to the use of a variable-length code table for encoding a source symbol (such as a character in a file) where the variable-length code table has been derived in a particular way based on the estimated probability of occurrence for each possible value of the source symbol.
Huffman coding uses a specific method for choosing the representation for each symbol, resulting in a prefix code that expresses the most common source symbols using shorter strings of bits than are used for less common source symbols. Huffman was able to design the most efficient compression method of this type: no other mapping of individual source symbols to unique strings of bits will produce a smaller average output size when the actual symbol frequencies agree with those used to create the code.
For a set of symbols with a uniform probability distribution and a number of members which is a power of two, Huffman coding is equivalent to simple binary block encoding, e.g., ASCII coding. Huffman coding is such a widespread method for creating prefix codes that the term “Huffman code” is widely used as a synonym for “prefix code” even when such a code is not produced by Huffman's algorithm.
Security Cameras
As is known, cameras used for security surveillance (SECCAMs) can produce high resolution and low resolution digital files. The files may be of static images or moving images. The cameras may auto focus and auto adjust for lighting. The cameras may store data or push it to network attached servers. Many SECCAMs do not pan or zoom and always present the same view. Some SECCAMs take a still image when triggered by a sensor, a timer, or an event.
One problem with conventional SECCAMs installed with onsite storage is that the data may be lost or stolen in the same incident for which the images would have been useful. SECCAMs may provide timestamps at the camera to record events for later viewing. In many cases, there is no attendant to monitor SECCAMs in real time. Thus economical remote storage and delayed analysis are advantageous if the useful images could be transported without congesting a low bandwidth network. A requirement is that allocated bandwidth schedules not be exceeded. Within this patent application we refer to JPEG compatible image files originating or derived from SECCAMs as “previews” or “frames”.
Thus it can be appreciated that what is needed is an improved system to bridge from cameras used for security surveillance to a network connected storage and analysis service center. Temporary storage of compressed images would allow bandwidth allocations to vary over time and day.